# -*- coding:utf-8 -*-

class Dog:
    def __init__(self, name):
        self.name = name

    def bark(self):
        print('I am %s'%self.name)


dog = Dog('张')
dog2 = Dog('王')
dog3 = Dog('李')

dog.bark()
dog2.bark()
dog3.bark()


class Person:
    place = 'earth'
    body = []

    def __init__(self, age):
        self.age = age

print(Person.place)
person = Person(18)
print(person.place)

person.place = 'spark'
print(Person.place, person.place) # earth spark

person.body.append('leg')
print(Person.body, person.body) # ['leg'] ['leg']

person.sex = 1
print(person.sex) # 1